<template>
  <el-form v-bind="$attrs" ref="formRef" class="small">
    <el-row :gutter="16">
      <slot></slot>
    </el-row>
  </el-form>
</template>
<script setup>
import { ref } from 'vue'

const formRef = ref(null)
const validate = () => {
  return formRef.value.validate()
}
const validateFields = () => {
  return formRef.value.validateFields(arguments)
}
const resetFields = () => {
  return formRef.value.resetFields(arguments)
}
const clearValidate = () => {
  return formRef.value.clearValidate(arguments)
}
const scrollToField = () => {
  return formRef.value.scrollToField(arguments)
}

defineExpose({
  formRef,
  validate,
  validateFields,
  resetFields,
  clearValidate,
  scrollToField
})
</script>
